Skip to content

(DO NOT MERGE) Identity integration branch - #495

Draft
aram356 wants to merge 850 commits into
mainfrom
rc/identity
Draft

aram356 wants to merge 850 commits into
mainfrom
rc/identity

Conversation

@aram356

@aram356 aram356 commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • rc/identity is the integration branch for server-side identity on every adapter (Platform capabilities for server-side identity on every adapter #468). It carries the ready PRs that Trusted Server's Fastly and Axum MVP needs, joined by history-preserving merges, so Trusted Server can pin one revision and CI can test the combined stack.
  • Each included PR keeps its own review and still lands on main by itself. This PR shows the combined diff and its CI.
  • The branch only moves forward. When an included PR's head moves, the new head is merged on top. Trusted Server pins a commit of this branch by SHA ((DO NOT MERGE) Identity integration branch trusted-server#1608); there are no tags.

Included

On main e11ea308. Heads are current at 9d02d7b3; earlier heads stay in the history.

PR Head What it brings
#275 ea2549fb Portable outbound HTTP and request lifecycle contracts
#499 c5c6b8e0 Authenticated head facts captured before transport sanitation; #275 review follow-ups
#460 ce94fe06 Outbound cache tags, borrowed readiness and paired time
#406 e37e0df2 Axum production startup and bounded shutdown
#407 d3188b1a Configurable Axum buffered JSON body limits
#409 16499531 Axum safe diagnostics and trusted proxy metadata
#414 1d89fb4e Native AWS configuration, secret and KV store providers
#422 e9459356 Native celld configuration and KV store providers
#439 c02ee549 Pluggable native Geo providers and protected CloudFront ingress
#469 61fd14d7 Standard JA4 request interface (#283), including Axum JA4 from a trusted proxy header
#502 8cd7af96 Geo on every adapter through ctx.geo(), and Axum geo bound from the manifest (#482)
#510 f2cacc67 KvStore record contract with listing strong within a partition, and DynamoDB and celld providers on Axum (#472, #473)
#454 925fe019 Portable KV-backed geo lookup
#514 ec0b912b Country and region through ctx.geo() on Cloudflare and Spin (#480, #486)
#517 10ed3803 Portable ClientInfo contract with Fastly, Axum, Cloudflare and Spin mappings (#475, #90, #91, #92, #485)
#509 2620377a Bounded work after the response on Fastly and Axum, drained on Axum SIGTERM (#476)
#512 cdc232c8 After-response work on Cloudflare through waitUntil (#478)
#515 ec347a2c Spin's after-response capability error (#483)

Moved since 9d02d7b3

None.

#463 closed on 2026-11-13; #422 carries its conditional celld record operations, which this branch already has.

How the record-contract, ClientInfo and after-response lines came in (2026-11-18)

ChristianPavilonis's line on #439 runs #510 → #454 → #517; #517 also merged #469, #502 and #514 itself. Its tree contains everything this branch had, so ef8225d9 merged #517. The only conflicts were JA4 lines that #517 refactors on top of #469 (Ja4Selection in place of TrustedJa4Header); the merge takes #517's version, and its tree is identical to #517's.

prk-Jr's after-response line sat on #406, so it conflicted with the stack above it. The fix is in the PRs: #509 merged #517 (2620377a), #512 merged #509 (cdc232c8), and #515, which conflicted with #512 in the changelog and the capabilities guide, now stacks on #512 (ec347a2c). This branch took #515's head as the plain merge 9d02d7b3, whose tree is identical to #515's. On GitHub the whole line is stack 511, from #499 up to #515; stack 516 was dissolved so #509 could change base.

How #502 came in (2026-11-17)

#502 was stacked on #439's earlier head 645703bf, and #439's refreshed head conflicted with it in one place: the Manifest struct's schema validators in edgezero-core's manifest.rs, where #502 adds the adapter geo placement check and #439 brings #275's Fastly logging check. #502's own merge 8cd7af96 (Merge PR #439 into PR #502 for outbound compatibility stack) keeps both, after the existing case-unique adapter keys check. This branch then took #502 as a plain merge, b6ada1cc, with no conflicts.

How #275's next review repairs came in (2026-11-17)

#275 moved from b65e7144 to ea2549fb by adding 16 fix and docs commits (Fastly response handles and progress wakers, retained outbound failures, body checkpoints, harness supervision, CLI target pinning). #422 had added a stock-celld store service (dd1b8907, 15bdeef6), which #439 merged in cf291a1e. Each stack PR then merged the PR below it, bottom-up, with no conflicts, and this branch took #439's head c02ee549 as a plain merge, f84ffbbb.

How #275's review repairs came in (2026-11-16)

#275 moved from e9ffaa8f to b65e7144 by adding four commits:

Each stack PR merged the PR below it again, bottom-up, in a merge commit titled Merge PR #<lower> into PR #<N> for outbound compatibility stack. Only #409 conflicted. Its merge resolves the import block of edgezero-core's app.rs by keeping both imports: #409's RouteErrorKind and #275's RequiredErrorResponseHeaders. This branch then took #439's head c1cec8e7 as a plain merge, 3d92ee38, with no conflicts.

How #275's rewrite came in

#275's head was rewritten at e9ffaa8f. The stack's conflicts were not resolved here. Instead, each stack PR merged the PR below it, bottom-up, and resolved its own conflicts in its own merge commit, titled Merge PR #<lower> into PR #<N> for outbound compatibility stack. Run git show --remerge-diff on a PR's merge to see exactly what its resolution changed. This branch then takes #439's head in a single merge.

PR Merge Conflicting hunks Resolution
#499 cf8003f1 9 Takes #275's CHANGELOG, SUITES.md, plan and Fastly callback-scope fixture; #275's never-ready upload replaces #499's string body. Keeps #499's received-head commit unchanged, its framing-receipt expect, and its byte-bound assertion under #275's record caps
#460 03d192fd 1 #460's three-policy contract loop on #275's executor handle
#406 b3187e1b 6 #406's run_local and run_owned structure, which now owns #275's AxumOutboundExecutor
#407 77fa6772 8 Keeps both forwarded_content_length and ingress_buffer; with_transport takes the executor and the JSON limit
#409 e1350bb2 8 from_app_with_native_client_factory takes the executor; dispatch keeps #409's into_parts and inserts the executor
#414 bd6cb7ab 0 One test gets an executor
#422 f1d85581 0 None needed
#439 302697e8 3 with_native_transport takes the executor; both the executor and geo fields

Edit in this branch's own merge

87174160 merged #439's head with two edits where #469 meets #275, and git show --remerge-diff 87174160 shows both. One is still this branch's own:

Edit Why
request.rs: #469's ingress_ja4_is_not_exposed_even_with_ja4_headers test gets an executor handle #275 passes the Axum outbound executor through into_core_request, and the test does not compile without one. #469 targets main, where the function still takes one argument, so the edit cannot live in #469 until it rebases onto #275

The other removed EdgeZeroAxumService from the Axum guide, because #275's check_outbound_legacy_api.sh rejects the name. That edit now comes from #469 itself (52f4a09f, the suggestion in its review), merged in 10166628 with no file change. It was the only red check here before.

Open points for the owning PRs

Point Owning PR
The request.rs edit above #469, or #275 if it lands second
Wire evidence over 1,024 records now fails, where #499 on its own accepted any count within the byte bound. Today's captures fit: the Fastly test uses 518 records and the Axum capture has 431 #499
Eight std test fixtures read accepted sockets that inherit non-blocking mode on macOS, so local macOS runs fail with WouldBlock (#503) #414, #422

Not included

PR Why not here
#389, #401, #444 Ready, but they conflict with #275 and land after it; no identity ticket waits on them
#452, #466 Drafts that land after #275 (#466 after #444); the MVP does not wait on them
#464 Draft, post-MVP
#287 Lands last, after the identity work

Next on this branch

Milestone Tickets
R1b (#489) Record contract (#472) and DynamoDB and celld providers on Axum (#473), through #510, included
R2 (#490) Bounded work after the response on Fastly and Axum (#476), through #509, included
R2b (#491) ClientInfo contract (#475) and Fastly and Axum ClientInfo (#90, #92) through #517; JA4 (#283, #469) and Axum geo from the manifest (#482, #502); all included
R3 (#492) Cloudflare: after-response (#478, #512), geo (#480, #514) and ClientInfo (#91, #517) included; the record store (#479) waits on DEC-8
R4 (#493) Spin: after-response error (#483, #515), geo (#486, #514) and ClientInfo (#485, #517) included; the record store (#484) waits on DEC-8

Each ticket's PR is merged here once it is ready. Every R1b, R2 and R2b ticket's PR is now included; R3 and R4 wait only on their record stores.

Refs #488. Part of #468. Planned in IABTechLab/trusted-server#1559.

Test plan

Check Result
Every head in Included is an ancestor of b6ada1cc through history-preserving merges Pass
10166628 has the same tree as 87174160 Pass
Each refreshed stack PR, locally: fmt, workspace clippy, workspace tests, and tests of the crates it touches Pass, apart from failures that also fail on that PR's original head
Every host step of test.yml and format.yml, locally on macOS, on #439's refreshed head and on 87174160 Pass, apart from the macOS-only failures in #503
check_outbound_legacy_api.sh and check_outbound_docs_contract.mjs on 87174160 Pass
Trusted Server's 27 CI gates against 10166628 (IABTechLab/trusted-server#1506 and IABTechLab/trusted-server#1608) Pass
CI on this PR at 10166628 30 of 30 pass. cache-restore-seed failed once on compiler-cache publication and passed on rerun
CI on every refreshed stack PR and on #469 Pass; #407, #409 and #439 needed the same deploy-workflow rerun
2026-11-16 refresh, each of the eight stack PRs locally: cargo fmt --all -- --check, cargo check --workspace --all-targets --features "fastly cloudflare", cargo clippy --workspace --all-targets --all-features -- -D warnings, cargo test --workspace --all-targets Pass on all eight: 2,762 tests at #499 rising to 2,973 at #439, none failed
The same four gates on 3d92ee38 Pass: 2,990 tests, none failed
2026-11-17 refresh, the same four gates on each of the eight stack PRs Pass on all eight: 2,787 tests at #499 rising to 2,997 at #439, none failed
The same four gates on f84ffbbb Pass: 3,014 tests, none failed
#502's merge 8cd7af96, locally: cargo fmt --all -- --check, cargo clippy --workspace --all-targets --all-features -- -D warnings, cargo test -p edgezero-core, cargo test -p edgezero-adapter-axum --features geo-cloudfront, cargo check --workspace --all-targets --features "fastly cloudflare spin", Fastly lib clippy Pass
b6ada1cc, locally: fmt, check_outbound_legacy_api.sh, check_outbound_docs_contract.mjs, workspace clippy, both Fastly clippy runs, the wasm feature check and cargo test --workspace --all-targets Pass: 3,021 tests, none failed
2026-11-18: #509 at 2620377a, #512 at cdc232c8 and #515 at ec347a2c, each locally: fmt, workspace clippy with all features, both Fastly clippy runs, the wasm feature check, workspace tests, both outbound scripts; plus Fastly contract tests under Viceroy, Cloudflare wasm tests in Node and Spin contract tests under Wasmtime Pass: 3,113, 3,116 and 3,118 workspace tests, none failed
ef8225d9 has the same tree as #517's head 10ed3803, and 9d02d7b3 the same tree as #515's head ec347a2c Pass
CI on #517 at 10ed3803 29 of 29 pass

prk-Jr and others added 30 commits November 18, 2026 18:44
…e tasks

Spin does not run after-response tasks. Every converted Spin request now
carries a scheduler that rejects registration with 501 Not Implemented and
the message exported as edgezero_adapter_spin::AFTER_RESPONSE_UNSUPPORTED,
instead of core's generic "not supported by this adapter" message. The task
is dropped without being polled.

The handle is installed in into_core_request_head, which every native Spin
entry point uses (run_app, run_app_with_platform, dispatch_app,
AppExt::dispatch, dispatch, dispatch_with_kv_label, into_core_request).
The capability matrix already reports Spin Unsupported, so
required = ["after-response-tasks"] still refuses Spin.

Tests: host unit test for the scheduler; wasm32 contract test dispatching a
real SpinRequest. Docs: capabilities, Spin guide, changelog, core
after_response docs, design and plan.
Installing a rejecting Spin scheduler changes a zero budget from 501 to
500: core now finds a handle and rejects the budget before the
scheduler, as it already does on Axum and Fastly. The guides, changelog
and spec claimed every Spin registration returns 501 and that the zero
budget case was unchanged. Correct them and pin the 500 with a Spin unit
test.

Also note that core pre-dispatch hooks can replace or remove the handle
(removal falls back to core's 501), that PR #512 overlaps on the
CHANGELOG line as well as the capabilities bullet, and point the #509
design at the follow-up.
Use the JA4 reconciliation from the audited #439/#502 composition as a reference, without carrying RC history. Preserve #454 Geo preparation and Cloudflare KV imports.
Move the ClientInfo fixture types before the module's functions so Cloudflare wasm clippy passes without test-utils, and stop the Debug redaction test from printing captured values in its assertion message (CodeQL rust/cleartext-logging).
Restore the pre-ClientInfo order so a generic JA4 header named in the forwarding family is never read, and pin it with a regression case.
Test helpers now pass a NotExposed snapshot, so neither adapter repeats core's optional dispatch branch. Add Manifest::client_info_direct_ingress for the shared manifest lookup, and reuse the ALB admission and trusted-peer checks in Axum.
SpinClientSource replaces the direct_ingress flag and optional Geo selection, so the conflicting pair cannot be stored. Managed contract tests now assert the exact ClientInfo for authenticated Geo, failed lookups, off mode and direct ingress, with IP-selective Geo data.
The handler guide limits the private snapshot to client_info() and geo(). The Axum guide explains that generated apps stay on the development runner unless a bindings file selects production.
#517 (10ed380) tops ChristianPavilonis's line on #439:
- #510, the KvStore record contract with DynamoDB and celld providers on
  Axum (#472, #473);
- #454, portable KV-backed geo;
- #514, country and region through ctx.geo() on Cloudflare and Spin (#480,
  #486);
- #517, the portable ClientInfo contract with its Fastly, Axum, Cloudflare and
  Spin mappings (#475, #90, #91, #92, #485).

#517 also merged #469 and #502 itself, so its tree contains everything this
branch had. The only conflicts were JA4 lines that #517 refactors on top of
#469; this merge takes #517's version, and its tree is identical to #517's.
#509 (2620377) adds bounded work after the response on Fastly and Axum, drained on Axum SIGTERM (EZI-1, #476). #512 (cdc232c) runs it on Cloudflare through waitUntil (#478), and #515 (ec347a2) reports Spin's capability error (#483). The line now stacks on #517 and each PR merged the one below it, so this merge is clean.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integration-branch revision with the #275 to #439 chain

4 participants